# Not work with adodbapi
#import adodbapi
sasdir = r'd:\test'
connStr = u'PROVIDER=sas.LocalProvider;DATA SOURCE=%s' % sasdir
#conn = adodbapi.connect(connStr)


# win32com.client
import win32com.client as wc

conn = wc.Dispatch(r'ADODB.Connection')
rst = wc.Dispatch(r'ADODB.RecordSet')

conn.Open(connStr)
rst.CursorLocation = 3

rst.Open('[aeaer]', conn, 0, 1, 512)
rst.RecordCount
headers = [rst.Fields(i).Name for i in range(rst.Fields.Count)]

rst.MoveFirst()

rows = [row for row in rst.GetRows()]




rst.Fields('STUDY').Value
rst.Fields('TAETM').Value
while not rst.EOF:
    print rst.Fields('TAETM').Value
    rst.MoveNext()
        

rst.Close()
conn.Close()
